
package cn.hz.wolf;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.LinkedBlockingQueue;
import java.sql.Connection;
public   class WzCustomer extends Thread {
	 private   LinkedBlockingQueue qu=WzSource.qu;
	 private List<WzClient> clients=new ArrayList<>(); 
	 
     public void append(WzClient cli){
    	 clients.add(cli); 
     }
    
     public void clear(){
    	 clients.clear(); 
     }
     
     public void run(){
    	 while(true){
    		 try{
    			Object obj= qu.take();
    			Map<String ,List<Map<String,Object>>> map=(Map<String ,List<Map<String,Object>>>)obj;
    			for(WzClient wzClient :clients ){
    				wzClient.invoke(map);
    			}
    		 }catch(Exception e){
    			 
    		 }
    	 }
     }
}